@ALL
Alguem tem um modelo de NPC que tipo ele fica andando e falando..?
Por lucashgas, 10 de jan. de 2012 em Tópicos Sem Resposta
info
Grupo: Visconde
Registrado: 22/07/12
Posts: 298
Reputação: +28
Char no Tibia: Lendreo

@ALL
Alguem tem um modelo de NPC que tipo ele fica andando e falando..?
tem rare candy q funciona ? e vai demorar pra sair a nova versão q pelo jeito promete ?
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

o nick.lua fica flando sozinhu.. e para fazer ele andar eh soh ir no .xml do npc e por..
<npc name="Frost Trainer" script=".Seavell Trainers.lua" walkinterval="3000" floorchange="0" access="5" level="1" maglevel="1">
info
Grupo: Barão
Registrado: 01/05/11
Posts: 234
Reputação: +43
Gênero: Masculino

Testa ai
data/npc:
crie um arquivo .lua, e coloque isso dentro.
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Nome do Npc" script=".falando.lua" walkinterval="3500" floorchange="0" speed="100">
<health now="150" max="150"/>
<look type="614" head="115" body="122" legs="0" feet="76"/>
<parameters>
</parameters>
</npc>
agora vai em data/npc/scripts e crie um arquivo chamado .falando.lua e coloque isso dentro
local focus = 0
local talk_start = 0
local conv = 0
local target = 0
local following = false
local attacking = false
local talkState = {}
local finalname = ""
local intervalmin = 38
local intervalmax = 70
local delay = 25
local number = 1
local messages = {"Viu deu certo.",
"Edit aki",
"Aki tambem",
"e Por final aki",
}
function onThink()
if focus == 0 then
selfTurn(1)
delay = delay - 0.5
if delay <= 0 then
selfSay(messages[number])
number = number + 1
if number > #messages then
number = 1
end
delay = math.random(intervalmin, intervalmax)
end
return true
else
if not isCreature(focus) then
focus = 0
return true
end
end
return true
end
info
Grupo: Visconde
Registrado: 03/01/11
Posts: 303
Reputação: +47

@slicer tem msn ? isso pouparia vários posts inúteis aqui no xt.
@all alguem me passa um link de download do map editor e.e ta dando merda aqui no meu servidor com umas posicoes de templo
Editado Outubro 6 por RicardoSohnn
info
Grupo: Visconde
Registrado: 22/07/12
Posts: 298
Reputação: +28
Char no Tibia: Lendreo

@Slicer e pkNfan funciona ambos, vlw
@ALL
Agora queria saber se tem como mudar a COR quando o npc falar ou comprar tipo mark e nick emvez de amarelo queria por laranja..
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

achu q n tem como heim.. ;x
Alguem me ajuda com esse NPC ?
Quero ADD Mais um pokemon ( Sunkern ) e configurar ele pro PDA
Estou com esse erro ao usar ele:
[06/10/2012 16:28:09] [Error - Npc interface] [06/10/2012 16:28:09] data/npc/scripts/starter.lua:onCreatureSay [06/10/2012 16:28:09] Description: [06/10/2012 16:28:09] data/npc/scripts/starter.lua:165: attempt to call global 'getPokemonStatus' (a nil value) [06/10/2012 16:28:09] stack traceback: [06/10/2012 16:28:09] data/npc/scripts/starter.lua:165: in function <data/npc/scripts/starter.lua:39>
Script do NPC:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('See ya.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
local extrastrength = 1.1
local pokestorage = 997623
local storagecity = 997624
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 3 then
selfSay('Hello, Im Professor OAK. If are you the best trainer of Island i can let you go to your {journey}!',cid)
focus = cid
talk_start = os.clock()
conv = 0
end
if msgcontains(msg, 'journey') and conv == 0 and focus == cid then
selfSay('Okay. First, Choose you pokemon: {Caterpie}, {Weedle}, {Rattata}?',cid)
conv = 1
return true
end
if getPlayerStorageValue(cid, storagepoke) < 1 then
if msgcontains(msg, 'caterpie') and conv == 1 and focus == cid then
local pokemon = "Caterpie"
local pokeinfo = getPokemonStatus(pokemon)
if not pokeinfo then return true end
local btype = "normal"
if not pokeballs[btype] then return true end
local gender = getRandomGenderByName(pokemon)
local level = 5
local offense = pokeinfo.off * level * extrastrength
local defense = pokeinfo.def * level * extrastrength
local agility = pokeinfo.agi * level * extrastrength
local spatk = pokeinfo.spatk * level * extrastrength
local vit = pokeinfo.vit * level * extrastrength
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
local ball = 0
ball = doCreateItemEx(2219)
doItemSetAttribute(ball, "poke", pokemon)
doItemSetAttribute(ball, "hp", 1)
doItemSetAttribute(ball, "level", level)
doItemSetAttribute(ball, "exp", leveltable[level])
doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(ball, "offense", offense)
doItemSetAttribute(ball, "defense", defense)
doItemSetAttribute(ball, "speed", agility)
doItemSetAttribute(ball, "vitality", vit)
doItemSetAttribute(ball, "specialattack", spatk)
doItemSetAttribute(ball, "happy", happy)
doItemSetAttribute(ball, "gender", gender)
doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")
doPlayerAddItemEx(cid, ball, true)
doTransformItem(ball, pokeballs[btype].on)
selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)
conv = 2
focus = cid
setPlayerStorageValue(cid, storagepoke, 1)
end
if msgcontains(msg, 'weedle') and conv == 1 and focus == cid then
local pokemon = "Weedle"
local pokeinfo = getPokemonStatus(pokemon)
if not pokeinfo then return true end
local btype = "normal"
if not pokeballs[btype] then return true end
local gender = getRandomGenderByName(pokemon)
local level = 5
local offense = pokeinfo.off * level * extrastrength
local defense = pokeinfo.def * level * extrastrength
local agility = pokeinfo.agi * level * extrastrength
local spatk = pokeinfo.spatk * level * extrastrength
local vit = pokeinfo.vit * level * extrastrength
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
local ball = 0
ball = doCreateItemEx(2219)
doItemSetAttribute(ball, "poke", pokemon)
doItemSetAttribute(ball, "hp", 1)
doItemSetAttribute(ball, "level", level)
doItemSetAttribute(ball, "exp", leveltable[level])
doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(ball, "offense", offense)
doItemSetAttribute(ball, "defense", defense)
doItemSetAttribute(ball, "speed", agility)
doItemSetAttribute(ball, "vitality", vit)
doItemSetAttribute(ball, "specialattack", spatk)
doItemSetAttribute(ball, "happy", happy)
doItemSetAttribute(ball, "gender", gender)
doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")
doPlayerAddItemEx(cid, ball, true)
doTransformItem(ball, pokeballs[btype].on)
selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)
conv = 2
focus = cid
setPlayerStorageValue(cid, storagepoke, 1)
end
if msgcontains(msg, 'rattata') and conv == 1 and focus == cid then
local pokemon = "Rattata"
local pokeinfo = getPokemonStatus(pokemon)
if not pokeinfo then return true end
local btype = "normal"
if not pokeballs[btype] then return true end
local gender = getRandomGenderByName(pokemon)
local level = 5
local offense = pokeinfo.off * level * extrastrength
local defense = pokeinfo.def * level * extrastrength
local agility = pokeinfo.agi * level * extrastrength
local spatk = pokeinfo.spatk * level * extrastrength
local vit = pokeinfo.vit * level * extrastrength
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
local ball = 0
ball = doCreateItemEx(2219)
doItemSetAttribute(ball, "poke", pokemon)
doItemSetAttribute(ball, "hp", 1)
doItemSetAttribute(ball, "level", level)
doItemSetAttribute(ball, "exp", leveltable[level])
doItemSetAttribute(ball, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(ball, "offense", offense)
doItemSetAttribute(ball, "defense", defense)
doItemSetAttribute(ball, "speed", agility)
doItemSetAttribute(ball, "vitality", vit)
doItemSetAttribute(ball, "specialattack", spatk)
doItemSetAttribute(ball, "happy", happy)
doItemSetAttribute(ball, "gender", gender)
doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")
doPlayerAddItemEx(cid, ball, true)
doTransformItem(ball, pokeballs[btype].on)
selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)
conv = 2
focus = cid
setPlayerStorageValue(cid, storagepoke, 1)
end
elseif getPlayerStorageValue(cid, storagecity) < 1 then
selfSay("Chose your City. {Viridian}, {Pewter}, {Cerulean}, {Vermilion}, {Saffron}, {Celadon}, {Lavender}, {Fuchsia}, {Cinnabar}.",cid)
conv = 2
focus = cid
end
if (msg == "viridian") and conv == 2 and focus == cid then
doPlayerSetTown(cid, 8)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(8))
elseif msgcontains(msg, 'pewter') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 10)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(10))
elseif msgcontains(msg, 'cerulean') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 4)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(4))
elseif msgcontains(msg, 'vermilion') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 9)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(9))
elseif msgcontains(msg, 'saffron') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 1)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(1))
elseif msgcontains(msg, 'celadon') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 7)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(7))
elseif msgcontains(msg, 'lavender') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 5)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(5))
elseif msgcontains(msg, 'fuchsia') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 6)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(6))
elseif msgcontains(msg, 'cinnabar') and conv == 2 and focus == cid then
doPlayerSetTown(cid, 12)
setPlayerStorageValue(cid, storagecity, 1)
doTeleportThing(cid, getTownTemplePosition(12))
end
if msgcontains(msg, 'yes') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
selfSay('Sorry, Im busy at this moment.')
end
if msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3 then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('See ya.')
end
focus = 0
end
end
@EDIT.
Creditos do NPC:
Halls ( No forum do Centurion )
Proibida a copia do npc ou postagem em outros lugares sem autorização.
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@zeref
ae mano todo mundo no forum da pxg ta flando q os pokes pegos com a master ja vem boostados sim ;x
@off
alguem ja viu a nova quest da liga? kkk ate q o pessoal da pxg tem criatividade.... '---'
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

@Slicer
to vendo um video aqui da quest, não sei se é dela.. mais que é bem criativo é ASUHASH
essa é a quest?
Editado Outubro 6 por StyloMaldoso
info
Grupo: Conde
Registrado: 06/08/11
Posts: 752
Reputação: +112

@Slicer
Eles tem uma master ball e capturaram poke, não tem e não capturaram, acredito nisso que só aumenta o Boost
Jaja trago um video da quest até a Lorelei
@StyloMaldoso
Essa é a quest sim, AFF QUE COTOCO DO VIDEO NEM PASSOU DO PUZZLE MAIS FACIL! AFF
Editado Outubro 6 por ZerefShirou
Me ajudem ai por favor com o script do NPC Starter.
http://www.xtibia.com/forum/topic/177592-pokemon-dvidas-pda/page__st__12080__p__1356632#entry1356632
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@zeref
eh sei la.. mas oq me deixa intrigado eh q se for do jeito q vc fla n muda nd pra nite, scizor, steelix e provalmente kingdra ;x q na real seriam os pokes q os caras iriam usar a master... fica meio inutil sei la..
e ja tem gente na lorelei? kk soh vi um q foi ate a 3* parte, onde vem 3 discípulos ^^
Editado Outubro 6 por Slicer
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

@Slicer
voce chegou ver a mudança desta magia?

daora se for possivel muda, ou não. abraços ^^
waterfall tambem está assim.. hehe
Editado Outubro 6 por StyloMaldoso
info
Grupo: Barão
Registrado: 01/05/11
Posts: 234
Reputação: +43
Gênero: Masculino
@Stylo
Triste, ashuhuashuuhashuashusa
e o coco que ele vende :\
Editado Outubro 6 por PkNfan